package cn.yunyichina.provider.framework.dubbo.service;

import cn.yunyichina.provider.framework.data.SpringContextHandler;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.iface.entity.common.ResponseObject;
import cn.yunyichina.provider.iface.service.IAlipay;

public class AlipayService {

    static final String serviceName = "alipayService";

    static IAlipay alipayService = null;

    static {
        alipayService = SpringContextHandler.getBean(serviceName);
    }

    public static IAlipay getAlipayClient() {
        return alipayService;
    }

    public static Response callUnderlineFromInternal(String method, String data) {
        return alipayService.callUnderlineFromInternal("", method, data, (short) 0);
    }

    public static Response callUnderlineFromInternal(String sessionId, String method, String data) {
        return alipayService.callUnderlineFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String sessionId, String method, String data) {
        return alipayService.callHumpFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String method, String data) {
        return alipayService.callHumpFromInternal("", method, data, (short) 0);
    }

    public static ResponseObject callUnderlineFromInternalObject(String method, String data) {
        return alipayService.callUnderlineFromInternalObject("", method, data, (short) 0);
    }

}
